﻿using AutoMapper;
using Restful_Api.Entities;
using Restful_Api.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Restful_Api.ProFiles
{
    public class CompanyProFile : Profile
    {
        public CompanyProFile()
        {
            //CreateMap<Company, CompanyDto>();
            CreateMap<Company, CompanyDto>().ForMember(dest => dest.CompanyName, opt => opt.MapFrom(src => src.Name));
            CreateMap<CompanyAddDto, Company>();
            CreateMap<CompanyAddWithBankrupTimeDto, Company>();
        }
    }
}
